Intro

Simpler file uploads

Components for simplifying file uploads

Demo

Drop files here

Components

  • file-drop

    The file upload component

    Drop files here

    Attributes

    idString Id of the file input element
    labelString aria-label for the file input element
    acceptArray of Strings List of accepted file types Read more on mdn

    Events

    dropArray of files being selected
  • file-drop-preview

    Preview the file and show progress

    toddle_128x128.png

    21%

    1.9kb

    Attributes

    fileFile A File object
    loadingBoolean if true, shows a loading spinner
    uploaded-bytesNumber The number of bytes already uploaded. Used to show a progressbar